package com.tencent.wxcloudrun;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * ClassName: CorsConfig
 * Package: com.tencent.wxcloudrun
 * Description:
 *
 * @Date: 2023/1/23 7:10 PM
 * @Author: wht
 */
//@Configuration
//public class CorsConfig implements WebMvcConfigurer {
//    @Override
//    public void addCorsMappings(CorsRegistry registry) {
//        registry.addMapping("/**")
//                //是否发送Cookie
//                .allowCredentials(true)
//                //放行哪些原始域
//                .allowedOrigins("*")
//                .allowedMethods(new String[]{"GET", "POST", "OPTIONS", "PUT", "PATCH", "DELETE"})
//                .allowedHeaders("*")
//                .exposedHeaders("*");
//    }
//}
